using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using bitzhuwei.Compiler;

namespace bitzhuwei.AnsiCFormat {
    /// <summary>
    /// Correspond to the Vn node statement in the grammar(AnsiC).
    /// </summary>
    internal abstract partial class Vnstatement : IFullFormatter {
        // [172]=statement : labeled_statement ;
        // [173]=statement : compound_statement ;
        // [174]=statement : expression_statement ;
        // [175]=statement : selection_statement ;
        // [176]=statement : iteration_statement ;
        // [177]=statement : jump_statement ;

        public abstract TokenRange Scope { get; }

        public abstract void Format(TextWriter writer, FormatContext context);

        public abstract void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context);

        public abstract IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context);

        // [172]=statement : labeled_statement ;
        // dumped by InheritExtractor
        // internal class Vnlabeled_statement : Vnstatement {

        // }
        // [173]=statement : compound_statement ;
        // dumped by InheritExtractor
        // internal class Vncompound_statement : Vnstatement {

        // }
        // [174]=statement : expression_statement ;
        // dumped by InheritExtractor
        // internal class Vnexpression_statement : Vnstatement {

        // }
        // [175]=statement : selection_statement ;
        // dumped by InheritExtractor
        // internal class Vnselection_statement : Vnstatement {

        // }
        // [176]=statement : iteration_statement ;
        // dumped by InheritExtractor
        // internal class Vniteration_statement : Vnstatement {

        // }
        // [177]=statement : jump_statement ;
        // dumped by InheritExtractor
        // internal class Vnjump_statement : Vnstatement {

        // }

    }
}
